<?php
namespace Album\Model;
use Zend\InputFilter\Factory as InputFactory;
use Zend\InputFilter\InputFilter;
use Zend\InputFilter\InputFilterAwareInterface;
use Zend\InputFilter\InputFilterInterface;

class Category implements InputFilterAwareInterface
{
	public $id;
	public $title;
	public $parent_id;
	
	protected $inputFilter;
	
	public function exchangeArray($data)
	{
		$this->id = (!empty($data))? $data['id']: null;
		$this->title = (!empty($data))? $data['title']: null;
		$this->parent_id = (!empty($data)) ? $data['parent_id']:null;
	}
	
	public function getArrayCopy()
    {
        return get_object_vars($this);
    }
    
	public function setInputFilter(InputFilterInterface $inputFilter)
    {
        throw new \Exception( "Not used" );
    }
    
    public function getInputFilter()
	{
		if (!$this->inputFilter)
		{
			$inputFilter = new InputFilter();
            $factory     = new InputFactory();
            
		}
		return $this->inputFilter = $inputFilter;
	}
	
}